package kr.co.skplanet.commute.util;

import java.util.HashMap;

public class APIUtils {
	public static HashMap<String, Object> getResultHashMap(boolean success, String message) {
		return getResultHashMap(success, message, null);
	}
	public static HashMap<String, Object> getResultHashMap(boolean success, String message, Object data) {
		HashMap<String, Object> result = new HashMap<String, Object>();
		
		if(success)
			result.put("success", "SUCCESS");
		else
			result.put("success", "ERROR");
		
		result.put("message", message.toUpperCase());
		
		if(data != null)
			result.put("data", data);
		
		return result;
	}
}
